<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>个人信息</title>
	<link rel="stylesheet" href="__PUBLIC__/Mobile/css/zhang.css">
	<link rel="stylesheet" href="__PUBLIC__/Mobile/css/mobiscroll.css"/>
	<script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>
	<script src="__PUBLIC__/Common/Layer/layer.js"></script>
</head>

<body >
<!--账户管理-->
<div class="lm">
	<a href="javascript:history.back(-1);">
		<img src="__PUBLIC__/Mobile/images/return.png" style="height:22px; padding-left:3%; line-height:22px; width:6%; padding-top:2%;" class="left">
	</a>
    <span class="left size20">个人信息 </span>
</div>
<section>
<div class="personal">
  <p><b style="margin-top:5%">头像</b><span class="share-Triangle Head-portrait1"><img src="__PUBLIC__/Mobile/images/mine.png" width="60" height="60"></span></p>
  <p><b>账户余额</b><span class="share-Triangle"><a href="{:U('Mycenter/person_balance')}">￥00.00</a></span></p>
  <p><b>姓名</b><span class="share-Triangle"><if condition="$find['username'] neq '' "><a href="{:U('Mycenter/change_name')}">{$find.username}</a><else /><a href="{:U('Mycenter/change_name')}"><?php  echo substr_replace($find['mobile'],'******',3,6);  ?></a></if></span></p>
  <p><b>身份证号</b><span class="share-Triangle"><if condition="$find['idcard'] neq '' "><a href="{:U('Mycenter/change_idcard')}"><?php  echo substr_replace($find['idcard'],'******',4,10);  ?></a><else /><a href="{:U('Mycenter/change_idcard')}">暂无</a></if></span></p>
  <p><b>性别</b><span class="share-Triangle"><if condition="$find['sex'] eq m"><a href="{:U('Mycenter/change_sex')}">男</a><else /><a href="{:U('Mycenter/change_sex')}">女</a></if></span></p>
  <p><b>生日</b><span class="share-Triangle"><input style="text-align:right; margin-left:16%; color:#000000;" type="text" <if condition="$find['birthday'] neq ''">value="{$find.birthday}"<else />value="设置生日"</if>  id="date" autocomplete="off" /></span></p>
  <p style="margin-top:3%"><b>手机号</b><span class="share-Triangle"><a href="{:U('Mycenter/change_phone')}"><?php  echo substr_replace($find['mobile'],'******',3,6);  ?></a></span></p>
  <p><b>登录密码</b><span class="share-Triangle"><a href="{:U('Mycenter/change_password')}">修改密码</a></span></p>
  <p><b>我的收货地址</b><span class="share-Triangle"><a href="{:U('Mycenter/address_list')}">查看地址</a></span></p>
</div>
<button class="immediately2 size26" style="border:none;" id="button" onClick="loginOut();">退出登录</button>

</section>

	<script src="__PUBLIC__/Mobile/js/mobiscroll.js" type="text/javascript"></script>
    <script  type="text/javascript">
    $(function() {
        var opt_date = {
            preset: 'date', //日期date
            theme: 'default', //皮肤样式
            dateFormat: 'yy-mm-dd', // 日期格式
            setText: '确定', //确认按钮名称
            cancelText: '取消', //取消按钮
            dateOrder: 'yymmdd', //面板中日期排列格式
            dayText: '日', monthText: '月', yearText: '年', //面板中年月日文字
        };
        $('#date').mobiscroll(opt_date);
    })

</script>
    
<style>
    .vad { margin: 150px 0 5px; font-family: Consolas,arial,宋体,sans-serif; text-align:center;}
    .vad a { display: inline-block; height: 36px; line-height: 36px; margin: 0 5px; padding: 0 50px; font-size: 14px; text-align:center; color:#eee; text-decoration: none; background-color: #222;}
    .vad a:hover { color: #fff; background-color: #000;}
    .thead { width: 728px; height: 90px; margin: 0 auto; border-bottom: 40px solid #fff;}
</style>


<div style="width:100%;margin:12px auto;text-align:right;" class="clearfix">
    <div style="width:50%; $('#date').mobiscroll(opt_date);text-align:right;">
        
    </div>
</div> 

<script>
	$("#date").change(function(){
			var month = $("#date").val();
			var timesmonth = Date.parse(new Date(month));
			timesmonth = timesmonth / 1000;
			//alert(timesmonth);
			$.ajax({
				url:"{:U('Mycenter/change_birthday')}",
				type:'post',
				datatype:'json',
				data:{timesmonth:timesmonth},
				success:function(result){
					if(result.isok == 'ok'){
					layer.alert('生日修改成功',1);
					location.herf="{:U('Mycenter/personedit')}";
				}else if(result.isok == 'off'){
					layer.alert('修改失败',6);
					return false;
				}
				}
			});
		});
	
	function loginOut(){
		layer.open({
		    content: '确认退出登录吗？',
		    btn: ['确认', '取消'],
		    shadeClose: false,
		    style: 'width:80%; height:40%;',
		    yes: function(){
		    	window.location.href = "{:U('User/login_out')}";
		    }
		});
	}
</script>
</body>
</html>
